package algorithm_primary.studyClass.新手课程.实现队列;

import java.util.LinkedList;
import java.util.List;

/**
 * @author 衡孟浩
 * @date 2023/5/28 15:16
 */
public class MyMain {

    public static void main(String[] args) {
        List a = new LinkedList();


        MyQueue<Integer> queue = new MyQueue<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        queue.offer(5);
        int size = queue.size();
        for (int i = 0; i < size; i++) {
            boolean empty = queue.isEmpty();
            Integer poll = queue.poll();
            Integer peck = queue.peck();
            System.out.println("empty: "+empty);
            System.out.println("poll: "+poll);
            System.out.println("peck: "+peck);
        }
    }
}
